UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Tjxna3AJnXH7qTzYCECHyKs8AOPz+P1Y+8TnkxP/qA0=' 
WHERE 
  key_id = '26f76ae65671d1139afe3ccbc8be5c5f4ee44e4bec09ea92ee3b18360174a890' 
  AND (
    token = 'Tjxna3AJnXH7qTzYCECHyKs8AOPz+P1Y+8TnkxP/qA0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033