UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EEP1xtYJEjzoGp96rwsmr1KvW0mFaD8Q1+lvidEBgUg='
WHERE
key_id = '435febed00e3ac1ceacf9af59a7ca1f28496620099aeae9f0ab5929930ce3cc2'
AND (
token = 'EEP1xtYJEjzoGp96rwsmr1KvW0mFaD8Q1+lvidEBgUg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)