UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ga/zhvVhVWfXMxmwoIp9yIwXK65VNSAWa35S9xz697Y='
WHERE
key_id = '667d3b689d77ed536f3f621ba70c6e19016f8d0ff81289b503e6eeb0b4cb15ab'
AND (
token = 'ga/zhvVhVWfXMxmwoIp9yIwXK65VNSAWa35S9xz697Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)