UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '45s6b3oRFB21OZboj6QwChT9+Nv/w4F3mz1Vcj6NOZs='
WHERE
key_id = '7335cc0de090e2270eb65e71a3782233062f3b1151ee3ee796d8ab44ec04b6be'
AND (
token = '45s6b3oRFB21OZboj6QwChT9+Nv/w4F3mz1Vcj6NOZs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)