UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mG/cQ5vswgzmvu2OdYhYs5y7HSL86Iku7fFkUfa1K1Q='
WHERE
key_id = '76648d01fda338c3c686513fbf262e87b79ba0040f2641117fb1ce8b7b98fc8f'
AND (
token = 'mG/cQ5vswgzmvu2OdYhYs5y7HSL86Iku7fFkUfa1K1Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)