UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q3/ccdDuYHH0QNO3HblKoVjUVJENHP02EQhZuuKiTXg='
WHERE
key_id = '34a7e76be92ea277530117186b9f07c6add429e5c4f0af6f239906949fbd8b66'
AND (
token = 'Q3/ccdDuYHH0QNO3HblKoVjUVJENHP02EQhZuuKiTXg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)