UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tlQdOXyginZgktUcUQEtdFZL3jDTdjCbadLfhKprsUc='
WHERE
key_id = '263682b6a7dd4c4ef68267799e5ba20ef0e153ff30dd1e46d85517d5e9fbaa01'
AND (
token = 'tlQdOXyginZgktUcUQEtdFZL3jDTdjCbadLfhKprsUc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)