UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3gNZosP4NXxGYnVFdGZ/kH7UlxLk5H5UVqow4CWBp1Y='
WHERE
key_id = '034ddd00f41d612fa30247b6249fd0c6a5b965524ecafc0ea1272c782767a325'
AND (
token = '3gNZosP4NXxGYnVFdGZ/kH7UlxLk5H5UVqow4CWBp1Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)