UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yReI5LqWYPlKXVkHF/v/ZXqtVbJO9L0VaOOh58ZfVNY='
WHERE
key_id = '13082e4eab6a030ca35df82edfac255f5f0998ec27877fd335ad7c58e148f203'
AND (
token = 'yReI5LqWYPlKXVkHF/v/ZXqtVbJO9L0VaOOh58ZfVNY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)