UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2GKelS+MqWk9n0Q90PKBj5mIi6qNMD33LWW10sR3ubE='
WHERE
key_id = '3dacd32ae2f88fc92171dc9f1fb2c31bbe09e99da65d4560ac698d4c245571a6'
AND (
token = '2GKelS+MqWk9n0Q90PKBj5mIi6qNMD33LWW10sR3ubE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)