UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fiuk4MxBGwVSAbEjNI6/UoA/RsOOBplNqFHQqboE7ds='
WHERE
key_id = '91084549d045d4b59084e1688920aa9a9ed379826f40ec79526e62cfa8de2142'
AND (
token = 'Fiuk4MxBGwVSAbEjNI6/UoA/RsOOBplNqFHQqboE7ds='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)