UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vuQ7HwRWu9Plf6U/h/6tLWQuQNsCK9WZEUJuWZWGo2A='
WHERE
key_id = '95f66bb721049f4cfaeca6633e59efe83bd9ae7f6d20619810247fc22e40714d'
AND (
token = 'vuQ7HwRWu9Plf6U/h/6tLWQuQNsCK9WZEUJuWZWGo2A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)