UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MlNlx9GN04YElVzfbJVq1MN2Kdbrf6vWzRkN3k9AgiI='
WHERE
key_id = '620d20410ee9a249fe0cf39ddf4975faa8a098cabdf284216b085f75c51c6cd7'
AND (
token = 'MlNlx9GN04YElVzfbJVq1MN2Kdbrf6vWzRkN3k9AgiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)