UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Xna/iFyGdDNA47T3QC22BltyAoZPnnFigGM2BwjSPpA='
WHERE
key_id = '930b9ae1c8f50ad63e528bcbde2b55032a2f38fa4000d09cdf8f3707b49f2a86'
AND (
token = 'Xna/iFyGdDNA47T3QC22BltyAoZPnnFigGM2BwjSPpA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)