UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1dkSK0ZrSU7v2y/fOTMToP92xDED4yOZlkUXr1/bvLs='
WHERE
key_id = 'c73c566be3bc9f4af3dec81c7677508dd8a60db1f8e5ebdd198449d74a9d0df7'
AND (
token = '1dkSK0ZrSU7v2y/fOTMToP92xDED4yOZlkUXr1/bvLs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)