UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8nf92CTz80pFA/Fv2RyONjph6DKwUMxf28Orxkqv3HA='
WHERE
key_id = '925bb52386d52a9fd7cf0f8ddcb890733f20d21209b4ca0c4dd2520ffb5952d1'
AND (
token = '8nf92CTz80pFA/Fv2RyONjph6DKwUMxf28Orxkqv3HA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)