UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'axMa0fH/8vPXd6th3C4uYOweqB2Cy8WnkBZPAmQCys0='
WHERE
key_id = 'e5cfbae0cdbbed4adfedb6496f6f4ca4564b44f22abef32a0f5776109784d616'
AND (
token = 'axMa0fH/8vPXd6th3C4uYOweqB2Cy8WnkBZPAmQCys0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)