UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GGQDwUofp9UH61kRFkQrsNHlHh1L+6iotebiW6s25jU='
WHERE
key_id = '997200f2f57085c4482d4c3787fafe88f6a344add16ab6594738261eebc094ce'
AND (
token = 'GGQDwUofp9UH61kRFkQrsNHlHh1L+6iotebiW6s25jU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)