UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+Pp6H4QSiAmNas7vsBounlM/zdjpSPl6cWp1NbrQuLM=' 
WHERE 
  key_id = '61e635aaedd24f8034c4cf1ecf4ac371ad25a0e83835433e380f615b4fa85737' 
  AND (
    token = '+Pp6H4QSiAmNas7vsBounlM/zdjpSPl6cWp1NbrQuLM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044