UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RzazXHLW+BpHWVyu6JXdJqHi/MxgpZXEOY8udUM8uqM='
WHERE
key_id = '57971a0eeddde220e05b977f0a33c40ec2b4e7bf1da69fcae06e69124f9d59d8'
AND (
token = 'RzazXHLW+BpHWVyu6JXdJqHi/MxgpZXEOY8udUM8uqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)