UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'f+UBgKLrFrTGfZ6KynqPWEcSyvrdhlTMkBtZC/Wgg14='
WHERE
key_id = '03f6dd0b0df41cd8cf87f2cdb24fd493948a03c5c1a55e87d240ca9e801e2f4f'
AND (
token = 'f+UBgKLrFrTGfZ6KynqPWEcSyvrdhlTMkBtZC/Wgg14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)