UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VmapNtLg+8meU6PjFyICTA3t2ohHGtu3UyjI/gmirg='
WHERE
key_id = 'bf8626d9480ce59a9651965f57fbe0a7de489a31b569c0b9a9402fae07ef9803'
AND (
token = '+VmapNtLg+8meU6PjFyICTA3t2ohHGtu3UyjI/gmirg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)