UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '57LfVUwqd1mJFMoMzxsS61KwheRs2Fc224CqHA3F5Cw='
WHERE
key_id = '72e98683e1ffb5e77614f67c52bcb6ec5be517cb8a5b2610ceb2eb6b9d41f4c6'
AND (
token = '57LfVUwqd1mJFMoMzxsS61KwheRs2Fc224CqHA3F5Cw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)