UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PQj+/rosw17iSkcNp9dhLAelPjlgIoZQqpeo85zcbJQ='
WHERE
key_id = '3e8a32e59e664da1c522ed25757b43ac1c639f33bb4d90ecc0d80e56b19d0e0a'
AND (
token = 'PQj+/rosw17iSkcNp9dhLAelPjlgIoZQqpeo85zcbJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)