UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+RFoc28v+T+erF/Uvym4E1q9z4kfhhWferbOwl7RMiE='
WHERE
key_id = '80bf94760c20f11fb04c9451bd437727f8f834b2c897c577d77c92bae6313fe0'
AND (
token = '+RFoc28v+T+erF/Uvym4E1q9z4kfhhWferbOwl7RMiE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)