UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'x9/rj8x+tOlAJnUGhQfH64HlGu3TAe+npsLR2tlSSpY='
WHERE
key_id = '3572f17138a784dea519157653caa1098aed78833dd4f91b20d5c9bbd8c32ccc'
AND (
token = 'x9/rj8x+tOlAJnUGhQfH64HlGu3TAe+npsLR2tlSSpY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)