UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'faxPhdh/rhqZvkpyaluKuz1z/mmn3g90X5GLu1lghjo='
WHERE
key_id = '8453c9046197c899518919ebb3505153b426e31df26e89370fabeb8c874000a0'
AND (
token = 'faxPhdh/rhqZvkpyaluKuz1z/mmn3g90X5GLu1lghjo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)