UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '03Hlx27yQ4Bc5wBHEliJJPMcqHCNKiUOZsfRkFVx0wA=' 
WHERE 
  key_id = '08ed3885d3a7e3bfed31ea36f34eeb46ec107427b9fcfcbbfe46df0e00633712' 
  AND (
    token = '03Hlx27yQ4Bc5wBHEliJJPMcqHCNKiUOZsfRkFVx0wA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016