UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FJG+YbfPPEQ7pO4nbQZol6zQV8TAjSaFbR2tq8qfZiQ='
WHERE
key_id = '6d41a79c7bbb436a3acafa28842de41c74b5c57ccd9fe6421562f313112cf036'
AND (
token = 'FJG+YbfPPEQ7pO4nbQZol6zQV8TAjSaFbR2tq8qfZiQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)