UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'I3Rh/KAyMIsrMBKqQmNy9X5tFvfw8piSF32zTmsriFw='
WHERE
key_id = '11ea86f8ee8ed0c8bbc6217262f2fa7c2a35fc101b3655e602345760b388b6f5'
AND (
token = 'I3Rh/KAyMIsrMBKqQmNy9X5tFvfw8piSF32zTmsriFw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)