UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tp3fGdgXw3P902teyKCKoukBM4z/Aa0H1HZMavGNcKg='
WHERE
key_id = '26639bf1ff087a6d273cb824e3d73504a46dbaaf04dfe7ecaf137b162239e623'
AND (
token = 'tp3fGdgXw3P902teyKCKoukBM4z/Aa0H1HZMavGNcKg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)