UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FRksNx4quvVPvAFrc/8X3/XZE94lUeNwgx3ThXeRH/8='
WHERE
key_id = '94dc451c90a5dcb74b36ac67ef6204d8ff8c567ea0f876f662e66e96bab1b02d'
AND (
token = 'FRksNx4quvVPvAFrc/8X3/XZE94lUeNwgx3ThXeRH/8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)