UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2qZ7dK4Np/ZJQ9y0uOPOi+WuTSWxi5RryaFNk42lzmI=' 
WHERE 
  key_id = '6e5301998ea0abffa124d9f430fefdcc685800cca4c10287454a04c5f4ad6d46' 
  AND (
    token = '2qZ7dK4Np/ZJQ9y0uOPOi+WuTSWxi5RryaFNk42lzmI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041