UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DzXY5tgZ+lws+SD03Q25ndUkmaE2uTfhWMy5ERHesWI='
WHERE
key_id = '35ac4f97abaaf4f350c6d6b2723663ebffb1075cd0db0df33973e3ba2002e79c'
AND (
token = 'DzXY5tgZ+lws+SD03Q25ndUkmaE2uTfhWMy5ERHesWI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)