UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/e/cR0zJ76mAWGo3oiMjSbMGK0yHzRPoX8bTTqDBWks='
WHERE
key_id = 'e01c08b279fc60c4afad40815b271450c776b7c3d891d867fa2c02b9e764ee7c'
AND (
token = '/e/cR0zJ76mAWGo3oiMjSbMGK0yHzRPoX8bTTqDBWks='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)