UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FEBttKFn+oW1rjC+v2AiziM3pq8d1hO/QfYFwqv30Fo='
WHERE
key_id = '722b5d0ed13d723c6081a2a7d8963c28b96e988f9b32fc7208adfef91c8e09e9'
AND (
token = 'FEBttKFn+oW1rjC+v2AiziM3pq8d1hO/QfYFwqv30Fo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)